<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>超人app消息推送</h2>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">选择推送目标<span class="check-tips">（默认为所有人）</span></label>
            <div class="controls">
                <select name="pushuser" id="isType" onchange="showdiv();">
                    <option value="1">all(所有人)</option>
                    <option value="2">指定分区推送</option>
                    <option value="3">指定人员推送</option>
                </select>
            </div>
        </div>
        <div class="form-item" style="display:none" id="tags">
            <label class="item-label">选择分区<span class="check-tips"></span></label>
            <div class="controls">
                <select name="pushtags">
                    <option value="A1区">A1区</option>
                    <option value="A2区">A2区</option>
                    <option value="A3区">A3区</option>
                    <option value="B1区">B1区</option>
                    <option value="B2区">B2区</option>
                </select>
            </div>
        </div>
        <div class="form-item" style="display:none" id="alias">
            <label class="item-label">输入用户uid</label>
            <div class="controls">
                <input  class="text input-large" name="pushalias" value="">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">填写推送消息<span class="check-tips">（输入需要推送的消息,字数保持在25字左右!）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="pushcontent" maxlength="30" value="">
            </div>
        </div>
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('LogisticsUser/apppush')}');
        
        function showdiv(){
            var istype = $("#isType").val();
            if (istype == 1){
                $("#tags").hide();
                $("#alias").hide();
            }if (istype == 2){
                $("#tags").show();
                $("#alias").hide();
            }if (istype == 3){
                $("#tags").hide();
                $("#alias").show();
            }
        }
    </script>
</block>
